// with polyfills
import 'core-js/stable';
import 'regenerator-runtime/runtime';

import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store/';
import { VueAxios } from './utils/request';
import { formatTime, beforeUpload } from '@/utils/util';
import moment from 'moment'

// mock
// WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
// import './mock'
import './element';
import Echarts from 'echarts'
import 'echarts/lib/chart/bar'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/chart/line'
import 'echarts/lib/component/polar'
import 'echarts/lib/chart/pie'
import 'echarts/lib/component/legend'
import 'echarts/lib/component/title'
// import './echarts';

import '@/assets/iconfont/iconfont.css' // 引入 iconfont 图标
import '@/assets/iconfont1/iconfont.css' // 引入 iconfont 左侧图标

import 'element-ui/lib/theme-chalk/index.css'

import bootstrap from './core/bootstrap';
import './core/lazy_use';
import './permission' // permission control
import './utils/filter'; // global filter
import './components/global.less';

// Vue.prototype.config = formatTime
import Viewer from 'v-viewer';
import 'viewerjs/dist/viewer.css';
import FormTable from '@/components/Form/FormTable';
// 
import EmptyComp from './components/EmptyComp'
import ETable from './components/ETable/index.js'

// import '@/styles/index.scss'
import '@/views/workflow/icons'


import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme

Vue.component(FormTable.name, FormTable);
Vue.component(EmptyComp.name, EmptyComp)
Vue.use(ETable)


// Vue.component('v-chart', ECharts)

Vue.prototype.echarts = Echarts
Vue.use(Echarts)

// 富文本编辑器
Vue.use(VueQuillEditor)

Vue.config.productionTip = false;
Vue.prototype.formatTime = formatTime;
Vue.prototype.beforeUpload = beforeUpload;
Vue.prototype.moment = moment

// mount axios Vue.$http and this.$http
Vue.use(VueAxios);
Vue.use(Viewer);
Viewer.setDefaults({
    Options: { inline: true, button: true, navbar: true, title: true, toolbar: true, tooltip: true, movable: true, zoomable: true, rotatable: true, scalable: true, transition: true, fullscreen: true, keyboard: true, url: 'data-source' }
});
new Vue({
    router,
    store,
    created: bootstrap,
    render: h => h(App)
}).$mount('#app');
